<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "https://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/xhtml;charset=UTF-8"/>
<meta http-equiv="X-UA-Compatible" content="IE=9"/>
<meta name="generator" content="Doxygen 1.8.15"/>
<meta name="viewport" content="width=device-width, initial-scale=1"/>
<title>QuantumLibrary: Bloomberg::quantum::IThreadContextBase Interface Reference</title>
<link href="../../tabs.css" rel="stylesheet" type="text/css"/>
<script type="text/javascript" src="../../jquery.js"></script>
<script type="text/javascript" src="../../dynsections.js"></script>
<link href="../../navtree.css" rel="stylesheet" type="text/css"/>
<script type="text/javascript" src="../../resize.js"></script>
<script type="text/javascript" src="../../navtreedata.js"></script>
<script type="text/javascript" src="../../navtree.js"></script>
<script type="text/javascript">
/* @license magnet:?xt=urn:btih:cf05388f2679ee054f2beb29a391d25f4e673ac3&amp;dn=gpl-2.0.txt GPL-v2 */
  $(document).ready(initResizable);
/* @license-end */</script>
<link href="../../search/search.css" rel="stylesheet" type="text/css"/>
<script type="text/javascript" src="../../search/searchdata.js"></script>
<script type="text/javascript" src="../../search/search.js"></script>
<link href="../../doxygen.css" rel="stylesheet" type="text/css" />
</head>
<body>
<div id="top"><!-- do not remove this div, it is closed by doxygen! -->
<div id="titlearea">
<table cellspacing="0" cellpadding="0">
 <tbody>
 <tr style="height: 56px;">
  <td id="projectalign" style="padding-left: 0.5em;">
   <div id="projectname">QuantumLibrary
   </div>
  </td>
 </tr>
 </tbody>
</table>
</div>
<!-- end header part -->
<!-- Generated by Doxygen 1.8.15 -->
<script type="text/javascript">
/* @license magnet:?xt=urn:btih:cf05388f2679ee054f2beb29a391d25f4e673ac3&amp;dn=gpl-2.0.txt GPL-v2 */
var searchBox = new SearchBox("searchBox", "../../search",false,'Search');
/* @license-end */
</script>
<script type="text/javascript" src="../../menudata.js"></script>
<script type="text/javascript" src="../../menu.js"></script>
<script type="text/javascript">
/* @license magnet:?xt=urn:btih:cf05388f2679ee054f2beb29a391d25f4e673ac3&amp;dn=gpl-2.0.txt GPL-v2 */
$(function() {
  initMenu('../../',true,false,'search.php','Search');
  $(document).ready(function() { init_search(); });
});
/* @license-end */</script>
<div id="main-nav"></div>
</div><!-- top -->
<div id="side-nav" class="ui-resizable side-nav-resizable">
  <div id="nav-tree">
    <div id="nav-tree-contents">
      <div id="nav-sync" class="sync"></div>
    </div>
  </div>
  <div id="splitbar" style="-moz-user-select:none;" 
       class="ui-resizable-handle">
  </div>
</div>
<script type="text/javascript">
/* @license magnet:?xt=urn:btih:cf05388f2679ee054f2beb29a391d25f4e673ac3&amp;dn=gpl-2.0.txt GPL-v2 */
$(document).ready(function(){initNavTree('da/d4d/structBloomberg_1_1quantum_1_1IThreadContextBase.html','../../');});
/* @license-end */
</script>
<div id="doc-content">
<!-- window showing the filter options -->
<div id="MSearchSelectWindow"
     onmouseover="return searchBox.OnSearchSelectShow()"
     onmouseout="return searchBox.OnSearchSelectHide()"
     onkeydown="return searchBox.OnSearchSelectKey(event)">
</div>

<!-- iframe showing the search results (closed by default) -->
<div id="MSearchResultsWindow">
<iframe src="javascript:void(0)" frameborder="0" 
        name="MSearchResults" id="MSearchResults">
</iframe>
</div>

<div class="header">
  <div class="summary">
<a href="#pub-types">Public Types</a> &#124;
<a href="#pub-methods">Public Member Functions</a> &#124;
<a href="../../d6/d9f/structBloomberg_1_1quantum_1_1IThreadContextBase-members.html">List of all members</a>  </div>
  <div class="headertitle">
<div class="title">Bloomberg::quantum::IThreadContextBase Interface Reference<span class="mlabels"><span class="mlabel">abstract</span></span></div>  </div>
</div><!--header-->
<div class="contents">

<p>Exposes methods to manipulate the thread context, especially future wait methods.  
 <a href="../../da/d4d/structBloomberg_1_1quantum_1_1IThreadContextBase.html#details">More...</a></p>

<p><code>#include &lt;<a class="el" href="../../d0/d9b/quantum__ithread__context__base_8h_source.html">quantum_ithread_context_base.h</a>&gt;</code></p>
<div class="dynheader">
Inheritance diagram for Bloomberg::quantum::IThreadContextBase:</div>
<div class="dyncontent">
 <div class="center">
  <img src="../../da/d4d/structBloomberg_1_1quantum_1_1IThreadContextBase.png" usemap="#Bloomberg::quantum::IThreadContextBase_map" alt=""/>
  <map id="Bloomberg::quantum::IThreadContextBase_map" name="Bloomberg::quantum::IThreadContextBase_map">
<area href="../../d8/db0/structBloomberg_1_1quantum_1_1IContextBase.html" title="This interface exposes shared functionality between IThreadContext and ICoroContext." alt="Bloomberg::quantum::IContextBase" shape="rect" coords="0,0,262,24"/>
<area href="../../da/de3/structBloomberg_1_1quantum_1_1IThreadContext.html" title="Exposes methods to manipulate the thread context." alt="Bloomberg::quantum::IThreadContext&lt; RET &gt;" shape="rect" coords="0,112,262,136"/>
<area href="../../d8/df7/classBloomberg_1_1quantum_1_1Context.html" title="Concrete class representing a coroutine or a thread context." alt="Bloomberg::quantum::Context&lt; RET &gt;" shape="rect" coords="0,168,262,192"/>
  </map>
</div></div>
<table class="memberdecls">
<tr class="heading"><td colspan="2"><h2 class="groupheader"><a name="pub-types"></a>
Public Types</h2></td></tr>
<tr class="memitem:a95643a462eecd0836f9fd348703f77a2"><td class="memItemLeft" align="right" valign="top">using&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="../../da/d4d/structBloomberg_1_1quantum_1_1IThreadContextBase.html#a95643a462eecd0836f9fd348703f77a2">Ptr</a> = std::shared_ptr&lt; <a class="el" href="../../da/d4d/structBloomberg_1_1quantum_1_1IThreadContextBase.html">IThreadContextBase</a> &gt;</td></tr>
<tr class="separator:a95643a462eecd0836f9fd348703f77a2"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="inherit_header pub_types_structBloomberg_1_1quantum_1_1IContextBase"><td colspan="2" onclick="javascript:toggleInherit('pub_types_structBloomberg_1_1quantum_1_1IContextBase')"><img src="../../closed.png" alt="-"/>&#160;Public Types inherited from <a class="el" href="../../d8/db0/structBloomberg_1_1quantum_1_1IContextBase.html">Bloomberg::quantum::IContextBase</a></td></tr>
<tr class="memitem:ac92e5d294479f777fd01f5621e4f8db9 inherit pub_types_structBloomberg_1_1quantum_1_1IContextBase"><td class="memItemLeft" align="right" valign="top">using&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="../../d8/db0/structBloomberg_1_1quantum_1_1IContextBase.html#ac92e5d294479f777fd01f5621e4f8db9">Ptr</a> = std::shared_ptr&lt; <a class="el" href="../../d8/db0/structBloomberg_1_1quantum_1_1IContextBase.html">IContextBase</a> &gt;</td></tr>
<tr class="separator:ac92e5d294479f777fd01f5621e4f8db9 inherit pub_types_structBloomberg_1_1quantum_1_1IContextBase"><td class="memSeparator" colspan="2">&#160;</td></tr>
</table><table class="memberdecls">
<tr class="heading"><td colspan="2"><h2 class="groupheader"><a name="pub-methods"></a>
Public Member Functions</h2></td></tr>
<tr class="memitem:ab76735c9a8cbb1f8ff193d122b70f642"><td class="memItemLeft" align="right" valign="top">virtual void&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="../../da/d4d/structBloomberg_1_1quantum_1_1IThreadContextBase.html#ab76735c9a8cbb1f8ff193d122b70f642">wait</a> () const =0</td></tr>
<tr class="memdesc:ab76735c9a8cbb1f8ff193d122b70f642"><td class="mdescLeft">&#160;</td><td class="mdescRight">Waits for the future associated with this context to be ready.  <a href="#ab76735c9a8cbb1f8ff193d122b70f642">More...</a><br /></td></tr>
<tr class="separator:ab76735c9a8cbb1f8ff193d122b70f642"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a84d767595a4b8acb729b759c500a4cba"><td class="memItemLeft" align="right" valign="top">virtual std::future_status&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="../../da/d4d/structBloomberg_1_1quantum_1_1IThreadContextBase.html#a84d767595a4b8acb729b759c500a4cba">waitFor</a> (std::chrono::milliseconds timeMs) const =0</td></tr>
<tr class="memdesc:a84d767595a4b8acb729b759c500a4cba"><td class="mdescLeft">&#160;</td><td class="mdescRight">Waits for the future associated with this context to be ready for a maximum of 'timeMs' milliseconds.  <a href="#a84d767595a4b8acb729b759c500a4cba">More...</a><br /></td></tr>
<tr class="separator:a84d767595a4b8acb729b759c500a4cba"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a52d3339262492bdac8e51d6317a5c4e3"><td class="memItemLeft" align="right" valign="top">virtual void&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="../../da/d4d/structBloomberg_1_1quantum_1_1IThreadContextBase.html#a52d3339262492bdac8e51d6317a5c4e3">waitAt</a> (int num) const =0</td></tr>
<tr class="memdesc:a52d3339262492bdac8e51d6317a5c4e3"><td class="mdescLeft">&#160;</td><td class="mdescRight">Waits for the future in the 'num-th' continuation context to be ready.  <a href="#a52d3339262492bdac8e51d6317a5c4e3">More...</a><br /></td></tr>
<tr class="separator:a52d3339262492bdac8e51d6317a5c4e3"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:ab3ad8ed1eae83ea16a8a6cda36243fe4"><td class="memItemLeft" align="right" valign="top">virtual std::future_status&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="../../da/d4d/structBloomberg_1_1quantum_1_1IThreadContextBase.html#ab3ad8ed1eae83ea16a8a6cda36243fe4">waitForAt</a> (int num, std::chrono::milliseconds timeMs) const =0</td></tr>
<tr class="memdesc:ab3ad8ed1eae83ea16a8a6cda36243fe4"><td class="mdescLeft">&#160;</td><td class="mdescRight">Waits for the future in the 'num-th' continuation context to be ready for a maximum of 'timeMs' milliseconds.  <a href="#ab3ad8ed1eae83ea16a8a6cda36243fe4">More...</a><br /></td></tr>
<tr class="separator:ab3ad8ed1eae83ea16a8a6cda36243fe4"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a56cf07f98b78dee7ab87a4899feffda2"><td class="memItemLeft" align="right" valign="top">virtual void&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="../../da/d4d/structBloomberg_1_1quantum_1_1IThreadContextBase.html#a56cf07f98b78dee7ab87a4899feffda2">waitAll</a> () const =0</td></tr>
<tr class="memdesc:a56cf07f98b78dee7ab87a4899feffda2"><td class="mdescLeft">&#160;</td><td class="mdescRight">Wait for all the futures in the continuation chain to be ready.  <a href="#a56cf07f98b78dee7ab87a4899feffda2">More...</a><br /></td></tr>
<tr class="separator:a56cf07f98b78dee7ab87a4899feffda2"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="inherit_header pub_methods_structBloomberg_1_1quantum_1_1IContextBase"><td colspan="2" onclick="javascript:toggleInherit('pub_methods_structBloomberg_1_1quantum_1_1IContextBase')"><img src="../../closed.png" alt="-"/>&#160;Public Member Functions inherited from <a class="el" href="../../d8/db0/structBloomberg_1_1quantum_1_1IContextBase.html">Bloomberg::quantum::IContextBase</a></td></tr>
<tr class="memitem:a39a012af6799019e99e1ab5364bb2c86 inherit pub_methods_structBloomberg_1_1quantum_1_1IContextBase"><td class="memItemLeft" align="right" valign="top">virtual&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="../../d8/db0/structBloomberg_1_1quantum_1_1IContextBase.html#a39a012af6799019e99e1ab5364bb2c86">~IContextBase</a> ()=default</td></tr>
<tr class="memdesc:a39a012af6799019e99e1ab5364bb2c86 inherit pub_methods_structBloomberg_1_1quantum_1_1IContextBase"><td class="mdescLeft">&#160;</td><td class="mdescRight">Virtual destructor.  <a href="../../d8/db0/structBloomberg_1_1quantum_1_1IContextBase.html#a39a012af6799019e99e1ab5364bb2c86">More...</a><br /></td></tr>
<tr class="separator:a39a012af6799019e99e1ab5364bb2c86 inherit pub_methods_structBloomberg_1_1quantum_1_1IContextBase"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a022df5fbd098b18058823ac74e4491d1 inherit pub_methods_structBloomberg_1_1quantum_1_1IContextBase"><td class="memItemLeft" align="right" valign="top">virtual bool&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="../../d8/db0/structBloomberg_1_1quantum_1_1IContextBase.html#a022df5fbd098b18058823ac74e4491d1">valid</a> () const =0</td></tr>
<tr class="memdesc:a022df5fbd098b18058823ac74e4491d1 inherit pub_methods_structBloomberg_1_1quantum_1_1IContextBase"><td class="mdescLeft">&#160;</td><td class="mdescRight">Determines if the future object associated with this context has a valid shared state with the corresponding promise.  <a href="../../d8/db0/structBloomberg_1_1quantum_1_1IContextBase.html#a022df5fbd098b18058823ac74e4491d1">More...</a><br /></td></tr>
<tr class="separator:a022df5fbd098b18058823ac74e4491d1 inherit pub_methods_structBloomberg_1_1quantum_1_1IContextBase"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a5cb482148c731b5b9d6866d7e57f962f inherit pub_methods_structBloomberg_1_1quantum_1_1IContextBase"><td class="memItemLeft" align="right" valign="top">virtual bool&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="../../d8/db0/structBloomberg_1_1quantum_1_1IContextBase.html#a5cb482148c731b5b9d6866d7e57f962f">validAt</a> (int num) const =0</td></tr>
<tr class="memdesc:a5cb482148c731b5b9d6866d7e57f962f inherit pub_methods_structBloomberg_1_1quantum_1_1IContextBase"><td class="mdescLeft">&#160;</td><td class="mdescRight">Determines if the future object associated with the 'num'-th continuation context is still valid.  <a href="../../d8/db0/structBloomberg_1_1quantum_1_1IContextBase.html#a5cb482148c731b5b9d6866d7e57f962f">More...</a><br /></td></tr>
<tr class="separator:a5cb482148c731b5b9d6866d7e57f962f inherit pub_methods_structBloomberg_1_1quantum_1_1IContextBase"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a084048c88d90de4f3797f18fb3c5fcc4 inherit pub_methods_structBloomberg_1_1quantum_1_1IContextBase"><td class="memItemLeft" align="right" valign="top">virtual int&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="../../d8/db0/structBloomberg_1_1quantum_1_1IContextBase.html#a084048c88d90de4f3797f18fb3c5fcc4">setException</a> (std::exception_ptr ex)=0</td></tr>
<tr class="memdesc:a084048c88d90de4f3797f18fb3c5fcc4 inherit pub_methods_structBloomberg_1_1quantum_1_1IContextBase"><td class="mdescLeft">&#160;</td><td class="mdescRight">Set an exception in the promise associated with the current <a class="el" href="../../da/de3/structBloomberg_1_1quantum_1_1IThreadContext.html" title="Exposes methods to manipulate the thread context.">IThreadContext</a> or <a class="el" href="../../d5/dd1/structBloomberg_1_1quantum_1_1ICoroContext.html" title="Exposes methods to manipulate the coroutine context.">ICoroContext</a>.  <a href="../../d8/db0/structBloomberg_1_1quantum_1_1IContextBase.html#a084048c88d90de4f3797f18fb3c5fcc4">More...</a><br /></td></tr>
<tr class="separator:a084048c88d90de4f3797f18fb3c5fcc4 inherit pub_methods_structBloomberg_1_1quantum_1_1IContextBase"><td class="memSeparator" colspan="2">&#160;</td></tr>
</table>
<a name="details" id="details"></a><h2 class="groupheader">Detailed Description</h2>
<div class="textblock"><p>Exposes methods to manipulate the thread context, especially future wait methods. </p>
</div><h2 class="groupheader">Member Typedef Documentation</h2>
<a id="a95643a462eecd0836f9fd348703f77a2"></a>
<h2 class="memtitle"><span class="permalink"><a href="#a95643a462eecd0836f9fd348703f77a2">&#9670;&nbsp;</a></span>Ptr</h2>

<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">using <a class="el" href="../../da/d4d/structBloomberg_1_1quantum_1_1IThreadContextBase.html#a95643a462eecd0836f9fd348703f77a2">Bloomberg::quantum::IThreadContextBase::Ptr</a> =  std::shared_ptr&lt;<a class="el" href="../../da/d4d/structBloomberg_1_1quantum_1_1IThreadContextBase.html">IThreadContextBase</a>&gt;</td>
        </tr>
      </table>
</div><div class="memdoc">

</div>
</div>
<h2 class="groupheader">Member Function Documentation</h2>
<a id="ab76735c9a8cbb1f8ff193d122b70f642"></a>
<h2 class="memtitle"><span class="permalink"><a href="#ab76735c9a8cbb1f8ff193d122b70f642">&#9670;&nbsp;</a></span>wait()</h2>

<div class="memitem">
<div class="memproto">
<table class="mlabels">
  <tr>
  <td class="mlabels-left">
      <table class="memname">
        <tr>
          <td class="memname">virtual void Bloomberg::quantum::IThreadContextBase::wait </td>
          <td>(</td>
          <td class="paramname"></td><td>)</td>
          <td> const</td>
        </tr>
      </table>
  </td>
  <td class="mlabels-right">
<span class="mlabels"><span class="mlabel">pure virtual</span></span>  </td>
  </tr>
</table>
</div><div class="memdoc">

<p>Waits for the future associated with this context to be ready. </p>
<dl class="section note"><dt>Note</dt><dd>Blocks until the future is ready or until an exception is thrown. </dd></dl>

<p>Implemented in <a class="el" href="../../d8/df7/classBloomberg_1_1quantum_1_1Context.html#a084c691c4873a2dd206b05ecd3e5dd34">Bloomberg::quantum::Context&lt; RET &gt;</a>, and <a class="el" href="../../da/de3/structBloomberg_1_1quantum_1_1IThreadContext.html#a61b2eb7438e46915e411d3fd7e96b82d">Bloomberg::quantum::IThreadContext&lt; RET &gt;</a>.</p>

</div>
</div>
<a id="a56cf07f98b78dee7ab87a4899feffda2"></a>
<h2 class="memtitle"><span class="permalink"><a href="#a56cf07f98b78dee7ab87a4899feffda2">&#9670;&nbsp;</a></span>waitAll()</h2>

<div class="memitem">
<div class="memproto">
<table class="mlabels">
  <tr>
  <td class="mlabels-left">
      <table class="memname">
        <tr>
          <td class="memname">virtual void Bloomberg::quantum::IThreadContextBase::waitAll </td>
          <td>(</td>
          <td class="paramname"></td><td>)</td>
          <td> const</td>
        </tr>
      </table>
  </td>
  <td class="mlabels-right">
<span class="mlabels"><span class="mlabel">pure virtual</span></span>  </td>
  </tr>
</table>
</div><div class="memdoc">

<p>Wait for all the futures in the continuation chain to be ready. </p>
<dl class="section note"><dt>Note</dt><dd>Blocks until all future values are ready. If any future throws, the exception is swallowed. </dd></dl>

<p>Implemented in <a class="el" href="../../d8/df7/classBloomberg_1_1quantum_1_1Context.html#a945677eefa8942162876ddc8a96e2a3f">Bloomberg::quantum::Context&lt; RET &gt;</a>, and <a class="el" href="../../da/de3/structBloomberg_1_1quantum_1_1IThreadContext.html#a4724f410e1d41c185f46ad394ad3bbe2">Bloomberg::quantum::IThreadContext&lt; RET &gt;</a>.</p>

</div>
</div>
<a id="a52d3339262492bdac8e51d6317a5c4e3"></a>
<h2 class="memtitle"><span class="permalink"><a href="#a52d3339262492bdac8e51d6317a5c4e3">&#9670;&nbsp;</a></span>waitAt()</h2>

<div class="memitem">
<div class="memproto">
<table class="mlabels">
  <tr>
  <td class="mlabels-left">
      <table class="memname">
        <tr>
          <td class="memname">virtual void Bloomberg::quantum::IThreadContextBase::waitAt </td>
          <td>(</td>
          <td class="paramtype">int&#160;</td>
          <td class="paramname"><em>num</em></td><td>)</td>
          <td> const</td>
        </tr>
      </table>
  </td>
  <td class="mlabels-right">
<span class="mlabels"><span class="mlabel">pure virtual</span></span>  </td>
  </tr>
</table>
</div><div class="memdoc">

<p>Waits for the future in the 'num-th' continuation context to be ready. </p>
<p>Allowed range for num is [-1, total_continuations). -1 is equivalent of calling <a class="el" href="../../da/d4d/structBloomberg_1_1quantum_1_1IThreadContextBase.html#ab76735c9a8cbb1f8ff193d122b70f642" title="Waits for the future associated with this context to be ready.">wait()</a> or waitAt(total_continuations-1) on the last context in the chain (i.e. the context which is returned via end()). Position 0 represents the first future in the chain. </p><dl class="params"><dt>Parameters</dt><dd>
  <table class="params">
    <tr><td class="paramdir">[in]</td><td class="paramname">num</td><td>The number indicating which future to wait on. </td></tr>
  </table>
  </dd>
</dl>
<dl class="section note"><dt>Note</dt><dd>Blocks until the value is ready or an exception is thrown. </dd></dl>

<p>Implemented in <a class="el" href="../../d8/df7/classBloomberg_1_1quantum_1_1Context.html#ac89818fc8478508cad80c6cdb833e2dd">Bloomberg::quantum::Context&lt; RET &gt;</a>, and <a class="el" href="../../da/de3/structBloomberg_1_1quantum_1_1IThreadContext.html#ac31560ef1209af2c86a76260dd70b189">Bloomberg::quantum::IThreadContext&lt; RET &gt;</a>.</p>

</div>
</div>
<a id="a84d767595a4b8acb729b759c500a4cba"></a>
<h2 class="memtitle"><span class="permalink"><a href="#a84d767595a4b8acb729b759c500a4cba">&#9670;&nbsp;</a></span>waitFor()</h2>

<div class="memitem">
<div class="memproto">
<table class="mlabels">
  <tr>
  <td class="mlabels-left">
      <table class="memname">
        <tr>
          <td class="memname">virtual std::future_status Bloomberg::quantum::IThreadContextBase::waitFor </td>
          <td>(</td>
          <td class="paramtype">std::chrono::milliseconds&#160;</td>
          <td class="paramname"><em>timeMs</em></td><td>)</td>
          <td> const</td>
        </tr>
      </table>
  </td>
  <td class="mlabels-right">
<span class="mlabels"><span class="mlabel">pure virtual</span></span>  </td>
  </tr>
</table>
</div><div class="memdoc">

<p>Waits for the future associated with this context to be ready for a maximum of 'timeMs' milliseconds. </p>
<dl class="params"><dt>Parameters</dt><dd>
  <table class="params">
    <tr><td class="paramdir">[in]</td><td class="paramname">timeMs</td><td>The maximum amount of milliseconds to wait until the future value becomes ready. </td></tr>
  </table>
  </dd>
</dl>
<dl class="section return"><dt>Returns</dt><dd>'ready' if value was posted before duration expired or 'timeout' otherwise. </dd></dl>
<dl class="section note"><dt>Note</dt><dd>Blocks until the value is ready, until 'timeMs' duration expires or until an exception is thrown. </dd></dl>

<p>Implemented in <a class="el" href="../../d8/df7/classBloomberg_1_1quantum_1_1Context.html#a3472f64cc9dd65b058f8fcbabc4e3d02">Bloomberg::quantum::Context&lt; RET &gt;</a>, and <a class="el" href="../../da/de3/structBloomberg_1_1quantum_1_1IThreadContext.html#a0bb2b08d8b6688e2186aaf3afb394dae">Bloomberg::quantum::IThreadContext&lt; RET &gt;</a>.</p>

</div>
</div>
<a id="ab3ad8ed1eae83ea16a8a6cda36243fe4"></a>
<h2 class="memtitle"><span class="permalink"><a href="#ab3ad8ed1eae83ea16a8a6cda36243fe4">&#9670;&nbsp;</a></span>waitForAt()</h2>

<div class="memitem">
<div class="memproto">
<table class="mlabels">
  <tr>
  <td class="mlabels-left">
      <table class="memname">
        <tr>
          <td class="memname">virtual std::future_status Bloomberg::quantum::IThreadContextBase::waitForAt </td>
          <td>(</td>
          <td class="paramtype">int&#160;</td>
          <td class="paramname"><em>num</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">std::chrono::milliseconds&#160;</td>
          <td class="paramname"><em>timeMs</em>&#160;</td>
        </tr>
        <tr>
          <td></td>
          <td>)</td>
          <td></td><td> const</td>
        </tr>
      </table>
  </td>
  <td class="mlabels-right">
<span class="mlabels"><span class="mlabel">pure virtual</span></span>  </td>
  </tr>
</table>
</div><div class="memdoc">

<p>Waits for the future in the 'num-th' continuation context to be ready for a maximum of 'timeMs' milliseconds. </p>
<p>Allowed range for num is [-1, total_continuations). -1 is equivalent of calling <a class="el" href="../../da/d4d/structBloomberg_1_1quantum_1_1IThreadContextBase.html#ab76735c9a8cbb1f8ff193d122b70f642" title="Waits for the future associated with this context to be ready.">wait()</a> or waitAt(total_continuations-1) on the last context in the chain (i.e. the context which is returned via end()). Position 0 represents the first future in the chain. </p><dl class="params"><dt>Parameters</dt><dd>
  <table class="params">
    <tr><td class="paramdir">[in]</td><td class="paramname">num</td><td>The number indicating which future to wait on. </td></tr>
    <tr><td class="paramdir">[in]</td><td class="paramname">timeMs</td><td>The maximum amount of milliseconds to wait until the future value becomes ready. </td></tr>
  </table>
  </dd>
</dl>
<dl class="section return"><dt>Returns</dt><dd>'ready' if value was posted before duration expired or 'timeout' otherwise. </dd></dl>
<dl class="section note"><dt>Note</dt><dd>Blocks until the value is ready, until 'timeMs' duration expires or until an exception is thrown. </dd></dl>

<p>Implemented in <a class="el" href="../../d8/df7/classBloomberg_1_1quantum_1_1Context.html#a13a7039dd07811ced226e5adc29d6819">Bloomberg::quantum::Context&lt; RET &gt;</a>, and <a class="el" href="../../da/de3/structBloomberg_1_1quantum_1_1IThreadContext.html#a6488bdb8b5c270ebaa069d7d9ed5819a">Bloomberg::quantum::IThreadContext&lt; RET &gt;</a>.</p>

</div>
</div>
</div><!-- contents -->
</div><!-- doc-content -->
<!-- start footer part -->
<div id="nav-path" class="navpath"><!-- id is needed for treeview function! -->
  <ul>
    <li class="navelem"><a class="el" href="../../d6/db9/namespaceBloomberg.html">Bloomberg</a></li><li class="navelem"><a class="el" href="../../dc/d48/namespaceBloomberg_1_1quantum.html">quantum</a></li><li class="navelem"><a class="el" href="../../da/d4d/structBloomberg_1_1quantum_1_1IThreadContextBase.html">IThreadContextBase</a></li>
    <li class="footer">Generated by
    <a href="http://www.doxygen.org/index.html">
    <img class="footer" src="../../doxygen.png" alt="doxygen"/></a> 1.8.15 </li>
  </ul>
</div>
</body>
</html>
